package de.unicornEntertainment.stundenplanapp.util;

import android.app.Activity;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class MyTools {
	
	// Globale Deklaration
	private Context context;

	// Konstruktoren
	public MyTools(Context context) {
		this.context = context;
	}
	
	public boolean isInternetVerfuegbar () {
		ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
		return activeNetworkInfo != null && activeNetworkInfo.isConnected();
	}

}
